package cc.mrbird.febs.member.service;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import cc.mrbird.febs.common.entity.QueryRequest;
import cc.mrbird.febs.member.entity.Member;

/**
 * 会员表 Service接口
 *
 * @author Lord
 * @date 2020-06-06 15:48:19
 */
public interface IMemberService extends IService<Member> {

    /**
     * 发送短信验证码
     * @param telephone 手机号
     */
    void sendSms(String telephone);

    /**
     * 验证短信验证码的有效性
     * 
     * @param telephone 手机号
     * @param verifyCode 验证码
     */
    void verifySms(String telephone, String verifyCode);

    /**
     * 短信验证码登录
     * 
     * @param telephone 手机号
     * @param verifyCode 验证码
     * @return
     */
    Member login(String telephone, String verifyCode);

    /**
     * 通过ID查找会员详细信息
     *
     * @param memberId 会员ID
     * @return 会员信息
     */
    Member findMemberDetailById(Long memberId);

    /**
     * 查询（分页）
     *
     * @param request QueryRequest
     * @param member member
     * @return IPage<Member>
     */
    IPage<Member> findMembers(QueryRequest request, Member member);

    /**
     * 查询（所有）
     *
     * @param member member
     * @return List<Member>
     */
    List<Member> findMembers(Member member);

    /**
     * 新增
     *
     * @param member member
     */
    void createMember(Member member);

    /**
     * 修改
     *
     * @param member member
     */
    void updateMember(Member member);

    /**
     * 删除
     *
     * @param member member
     */
    void deleteMember(Member member);

    /**
     * 删除会员
     *
     * @param memberIds 会员 id数组
     */
    void deleteMembers(String[] memberIds);
}
